package org.dingyom.basics.util;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;
@Data
@NoArgsConstructor
public class PageList<T> {
    //数据总量
    private Long total = 0L;//默认总数为0
    //当前页数据
    private List<T> rows = new ArrayList<>();

    //页面数据条数
    private Long totalPage = 1L;

    public PageList(Long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }
    public PageList(Long total, List<T> rows, Long totalPage) {
        this.total = total;
        this.rows = rows;
        this.totalPage = totalPage;
    }
}
